{template 'common/header'}
<ul class="nav nav-tabs">
    <li><a href="{php echo $this->createWebUrl('keyword', array('op'=>'display'));}">关键字列表</a></li>
    <li class="active"><a href="javascript:;">{if empty($unicode)}添加关键字{/if}{if $unicode!=""}编辑关键字{/if}</a></li>
</ul>
<div class="main">
    <form action="" method="post" class="form-horizontal form" id="form">
        <div class="panel panel-default">
            <div class="panel-heading">
                {if empty($unicode)}添加关键字{/if}{if $unicode!=""}编辑关键字{/if}
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">关键字：</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="name" value="{$cache['name']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">公司：</label>
                    <div class="col-sm-6">
                        {loop $company $key $item}
                        <div class="checkbox col-sm-4">
                            <label><input type="checkbox" name="company[]" value="{$item['id']}" {if in_array($item['id'],$companycache)}checked{/if}/>{$item['name']}</label>
                        </div>
                        {/loop}
                        {if empty($company)}
                        <label class="control-label">暂无公司详情，请到公司管理处添加公司</label>
                        {/if}
                    </div>
                    
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">关键字描述：</label>
                    <div class="col-sm-6">
                        <textarea class="form-control" name="description">{$cache['description']} </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label"></label>
                    <div class="col-sm-6">
                        <input name="submit" type="submit" value="保存" class="btn btn-primary" />
                        <input type="hidden" name="token" value="{$_W['token']}" />
                        <input type="hidden" name="unicode" value="{$unicode}" />
                        <input type="hidden" name="op" value="{$op}" />
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
{template 'common/footer'}
